package com.squapsource.project_euler;

public class Problem9 {

	private static final int SUM_AMT = 1000;

	/**
	 * @param args
	 */
	public static void main(String[] args) {

		for (int b = 1; b < SUM_AMT; b++) {
			for (int a = 1; a < b; a++) {
				int c = SUM_AMT - a - b;
				if (Math.pow(a, 2) + Math.pow(b, 2) != Math.pow(c, 2))
					continue;
				System.out.printf("(%d, %d, %d) = %d", a, b, c, a * b * c);
				System.exit(0);

			}
		}

	}

}
